import datetime

# 获取当前日期
now = datetime.datetime.now()

# 获取当前月的一号
first_day_of_current_month = datetime.datetime(now.year, now.month, 1)

# 获取下个月的一号
if now.month == 12:
    first_day_of_next_month = datetime.datetime(now.year + 1, 1, 1)
else:
    first_day_of_next_month = datetime.datetime(now.year, now.month + 1, 1)

# 格式化为 'YYYY-MM-DD' 字符串
current_month_str = first_day_of_current_month.strftime('%Y-%m-%d')
next_month_str = first_day_of_next_month.strftime('%Y-%m-%d')

# 获取本周第一天（周一）
first_day_of_week = now - datetime.timedelta(days=now.weekday())
# 获取本周最后一天（周日）
last_day_of_week = first_day_of_week + datetime.timedelta(days=6)
# 获取上周五
last_friday = first_day_of_week - datetime.timedelta(days=3)
last_friday = last_friday.strftime('%Y-%m-%d')
today = now.strftime('%Y-%m-%d')


# 格式化为 'YYYY-MM-DD' 字符串
first_day_of_week_str = first_day_of_week.strftime('%Y-%m-%d')
last_day_of_week_str = last_day_of_week.strftime('%Y-%m-%d')

#print("当前月的一号:", current_month_str)
# print("下个月的一号:", next_month_str)

#获取时间戳
import time


millis = int(round(time.time() * 1000))

# print("本周第一天:", first_day_of_week_str)
# print("本周最后一天:", last_day_of_week_str)
# print("当前时间戳",millis)
print("上周五:",last_friday)
print("今天:",today)